package com.rxm.ys.service.feign;

import com.rxm.ys.Rs;
import com.rxm.ys.entity.User;
import com.rxm.ys.feign.UserClient;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author FengYi
 * @Date 2020-05-27 14:09
 */
@RestController
public class UserClientImpl implements UserClient {


    @Override
    public Rs<User> getById(Long id) {
        User user = User.builder().id(id).userName("userName").build();
        return Rs.data(user);
    }


    @Override
    public Rs<User> getByCode(String code) {
        User user = User.builder().code(code).userName("userName").build();
        return Rs.data(user);
    }
}
